﻿@model ICollection<CleverCMS.Cms.Data.Entities.CmsTag>

@section TitleContent
{
    Tags   
}

<div class="widget green">
    <div class="widget-title">
        <h4><i class="icon-reorder"></i> Tags</h4>
    </div>
    <div class="widget-body">
        <div id="TagsContainer">
        </div>
    </div>
</div>

<script type="text/javascript">
    $(document).ready(function () {
        $('#TagsContainer').jtable({
            paging: true,
            pageSize: 20,
            sorting: true,
            defaultSorting: 'Id ASC',
            gotoPageArea: 'none',
            pageSizeChangeArea: false,
            actions: {
                listAction: '@Url.Action("ListPostsTags")',
                deleteAction: '@Url.Action("PostsTagDelete")'
            },
            fields: {
                Id: {
                    title: 'Id',
                    key: true,
                    create: false,
                    edit: false,
                    list: true,
                    width: '5%'
                },
                Name: {
                    title: 'Name',
                    width: '75%',
                    edit: false
                },
                TagCount: {
                    title: 'Pages',
                    sorting: false,
                    edit: false
                }   
            }
        });
        
        $('#TagsContainer').jtable('load');
    });
</script>